/*
	sc3_npp_startup.scd
	created: 2/15/2012 by Luke Selden
	
	This startup script sets up an osc responder listening for prompts from the corresponding sc3_npp_repl.php file
	that file sends an oscmessage with the name of the temp file with the selected code in Notepad++
	the OSCresponder loads the text in this file and interprets it.

*/

var npp_ip = "127.0.0.1"; // set this to the IP of the sending machine ( localhost )
var osc_path = 'nppeval'; // MUST match the settings in sc3_npp_repl.php
// create OSCresponder.  could use OSCresponderNode, but should have exclusive control over this osc path
~repl_responder = OSCresponder.new(NetAddr.new(npp_ip, nil), osc_path, {|t,r,m| m[1].asString.load(); }).add();
"==========================".postln;
"Notepad++ repl ready!, listing for commands with address 'nppeval'".postln;